package com.meichis.yndms.model;

import java.io.Serializable;
import java.util.Comparator;

/**
 * @author xmy
 * @title
 * @remake
 * @create 2021-10-18 17:55
 */
public class DealerPortUsage implements Serializable {


    /**
     * UserName : 陈佩如
     * JHDayNum : 6.0
     * SJDayNum : 4.0
     * PortAttendance : 67.00%
     */

    private String UserName;
    private double JHDayNum;
    private double SJDayNum;
    private String PortAttendance;

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String UserName) {
        this.UserName = UserName;
    }

    public double getJHDayNum() {
        return JHDayNum;
    }

    public void setJHDayNum(double JHDayNum) {
        this.JHDayNum = JHDayNum;
    }

    public double getSJDayNum() {
        return SJDayNum;
    }

    public void setSJDayNum(double SJDayNum) {
        this.SJDayNum = SJDayNum;
    }

    public String getPortAttendance() {
        return PortAttendance;
    }

    public void setPortAttendance(String PortAttendance) {
        this.PortAttendance = PortAttendance;
    }


    public static class CategoryComparator implements Comparator<DealerPortUsage> {

        @Override
        public int compare(DealerPortUsage s1, DealerPortUsage s2) {
            if ((s2.getSJDayNum() - s1.getSJDayNum()) > 0) {
                return 1;
            } else if (s2.getSJDayNum() - s1.getSJDayNum() < 0) {
                return -1;
            } else {
                return 0;
            }
        }
    }

}
